// zen.cpp : Defines the entry point for the console application.
//

#include <iostream>
#include <cmath>

#include "types.hpp"
#include "renderer.hpp"
#include "primitives.hpp"
#include "shaders.hpp"
#include "lw/lwo.hpp"

using namespace std;

int main(int argc, char* argv[])
{
/*	Scene scene = Scene();

	scene.addPrimitive(new Sphere(Vector3(2.0, -2.0, 5.0), 1.5), new MirrorShader(Color(0.8, 0.8, 0.8)));
	scene.addPrimitive(new Sphere(Vector3(-2.0, -2.0, 5.0), 1.5), new OcclusionShader(Color(0.7, 0.6, 0.3)));
	
	scene.addPrimitive(new Plane(Vector3(4.0, 0.0, 0.0), Vector3(-1.0, 0.0, 0.0)),
		new ConstShader(Color(1.0, 0.2, 0.2)));
	scene.addPrimitive(new Plane(Vector3(-4.0, 0.0, 0.0), Vector3(1.0, 0.0, 0.0)),
		new ConstShader(Color(0.2, 1.0, 0.2)));

	scene.addPrimitive(new Plane(Vector3(0.0, 4.0, 0.0), Vector3(0.0, -1.0, 0.0)),
		new OcclusionShader(Color(0.7, 0.7, 0.7)));
	scene.addPrimitive(new Plane(Vector3(0.0, -4.0, 0.0), Vector3(0.0, 1.0, 0.0)),
		new OcclusionShader(Color(0.5, 0.5, 0.7)));

	scene.addPrimitive(new Plane(Vector3(0.0, 0.0, 7.0), Vector3(0.0, 0.0, -1.0)),
		new ConstShader(Color(0.0, 0.0, 0.0)));

	TriBuffer buf;
	buf.vertices.push_back(Vector3(-1.0, -1.0, 3.0));
	buf.vertices.push_back(Vector3(-1.0, 1.0, 3.0));
	buf.vertices.push_back(Vector3(1.0, -1.0, 3.0));
	buf.vertIDs.push_back(TriIDs(0, 1, 2));
	scene.addPrimitive(new Triangle(0, &buf), new ConstShader(Color(0.2, 0.2, 1.0)));
	buf.vertices.push_back(Vector3(1.0, 1.0, 3.0));
	buf.vertIDs.push_back(TriIDs(1, 3, 2));
	scene.addPrimitive(new Triangle(1, &buf), new ConstShader(Color(0.2, 0.2, 1.0)));

	Renderer renderer = Renderer(255, 255, "zenout.ppm"); // FIXME!!!  magic number
	renderer.render(scene);*/

	fstream is("some.lwo", ios_base::in | ios_base::binary);
	LwoLoader::load(is);

	return 0;
}
